<script setup>
import { ref } from "vue";
import {
  ElMenu,
  ElMenuItem,
  ElSubMenu,
  ElRow,
  ElCol,
  ElCarousel,
  ElCarouselItem,
  ElButton,
  // ElBackTop,
} from "element-plus";
import "element-plus/dist/index.css";
import AppHeader from "./components/layout/AppHeader.vue";
import AppFooter from "./components/layout/AppFooter.vue";
import HomeBanner from "./components/home/HomeBanner.vue";
import AboutSection from "./components/home/AboutSection.vue";
import ProductsSection from "./components/home/ProductsSection.vue";
import SolutionsSection from "./components/home/SolutionsSection.vue";
import NewsSection from "./components/home/NewsSection.vue";
import ContactSection from "./components/home/ContactSection.vue";
import BackToTop from "./components/common/BackToTop.vue";
</script>

<template>
  <div class="app-container">
    <!-- Header -->
    <AppHeader />

    <!-- Banner -->
    <HomeBanner />

    <!-- About Section -->
    <AboutSection />

    <!-- Products Section -->
    <ProductsSection />

    <!-- Solutions Section -->
    <SolutionsSection />

    <!-- News Section -->
    <NewsSection />

    <!-- Contact Section -->
    <ContactSection />

    <!-- Footer -->
    <AppFooter />

    <!-- Back to Top Button -->
    <BackToTop />
  </div>
</template>

<style>
/* Global Styles */
:root {
  --primary-color: #2c8a56;
  --secondary-color: #f5f5f5;
  --text-color: #333;
  --light-text: #fff;
  --border-color: #e0e0e0;
  --section-padding: 80px 0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  color: var(--text-color);
  line-height: 1.6;
}

.app-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.section {
  padding: var(--section-padding);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.section-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.section-divider {
  width: 60px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 0 auto 30px;
}

.section-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  font-size: 16px;
}

/* Header Styles */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 50px;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo {
  width: 50px;
  height: 50px;
  margin-right: 15px;
}

.company-name {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary-color);
}

.navigation {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.menu {
  border-bottom: none;
}

/* Banner Styles */
.banner-section {
  margin-top: 0;
}

.banner-item {
  height: 500px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  position: relative;
}

.banner-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
}

.banner-item-1 {
  background-image: url("https://images.unsplash.com/photo-1625246333195-78d9c38ad449?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80");
}

.banner-item-2 {
  background-image: url("https://images.unsplash.com/photo-1627920769842-6b75b3e85e0b?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80");
}

.banner-item-3 {
  background-image: url("https://images.unsplash.com/photo-1625243338629-a7b33d7947f9?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80");
}

.banner-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  color: var(--light-text);
  position: relative;
  z-index: 1;
  padding: 0 20px;
}

.banner-title {
  font-size: 48px;
  margin-bottom: 20px;
  font-weight: bold;
}

.banner-text {
  font-size: 20px;
  margin-bottom: 30px;
}

.banner-button {
  padding: 12px 30px;
  font-size: 16px;
}

/* About Section Styles */
.about-section {
  background-color: var(--secondary-color);
}

.about-features {
  margin-top: 40px;
}

.feature-card {
  background-color: #fff;
  padding: 30px;
  border-radius: 5px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  height: 100%;
}

.feature-icon {
  font-size: 40px;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 20px;
  margin-bottom: 15px;
}

/* Products Section Styles */
.product-list {
  margin-bottom: 30px;
}

.product-card {
  background-color: #fff;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  height: 100%;
}

.product-image {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.product-image-1 {
  background-image: url("https://images.unsplash.com/photo-1586771107445-d3ca888129ce?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1472&q=80");
}

.product-image-2 {
  background-image: url("https://images.unsplash.com/photo-1625243338629-28c3f5b7ea55?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80");
}

.product-image-3 {
  background-image: url("https://images.unsplash.com/photo-1621628898826-8956e10449eb?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80");
}

.product-info {
  padding: 20px;
}

.product-info h3 {
  margin-bottom: 10px;
}

.product-info p {
  margin-bottom: 15px;
  color: #666;
}

.view-more {
  text-align: center;
  margin-top: 20px;
}

/* Solutions Section Styles */
.solutions-section {
  background-color: var(--secondary-color);
}

.solution-card {
  display: flex;
  background-color: #fff;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  height: 100%;
}

.solution-content {
  padding: 30px;
  flex: 1;
}

.solution-content h3 {
  margin-bottom: 15px;
}

.solution-content p {
  margin-bottom: 20px;
  color: #666;
}

.solution-image {
  flex: 1;
  background-size: cover;
  background-position: center;
  min-height: 250px;
}

.solution-image-1 {
  background-image: url("https://images.unsplash.com/photo-1625243338629-7c8e0ed9a93c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80");
}

.solution-image-2 {
  background-image: url("https://images.unsplash.com/photo-1625243338629-28c3f5b7ea55?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80");
}

/* News Section Styles */
.news-card {
  background-color: #fff;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  height: 100%;
}

.news-image {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.news-image-1 {
  background-image: url("https://images.unsplash.com/photo-1625243338629-28c3f5b7ea55?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80");
}

.news-image-2 {
  background-image: url("https://images.unsplash.com/photo-1625246333195-78d9c38ad449?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80");
}

.news-image-3 {
  background-image: url("https://images.unsplash.com/photo-1625243338629-7c8e0ed9a93c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80");
}

.news-info {
  padding: 20px;
}

.news-date {
  color: #999;
  font-size: 14px;
}

.news-info h3 {
  margin: 10px 0;
}

.news-info p {
  margin-bottom: 15px;
  color: #666;
}

.news-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

/* Contact Section Styles */
.contact-section {
  background-color: var(--secondary-color);
}

.contact-info {
  padding: 20px;
}

.contact-info h3,
.contact-form h3 {
  margin-bottom: 20px;
  color: var(--primary-color);
}

.contact-info p {
  margin-bottom: 15px;
}

.contact-form {
  background-color: #fff;
  padding: 30px;
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.form-group textarea {
  height: 120px;
  resize: vertical;
}

.submit-btn {
  width: 100%;
}

/* Footer Styles */
.footer {
  background-color: #333;
  color: #fff;
  padding: 60px 0 20px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.footer-logo {
  flex: 0 0 25%;
  padding-right: 30px;
}

.footer-logo img {
  width: 80px;
  margin-bottom: 15px;
}

.footer-links {
  flex: 0 0 75%;
  display: flex;
  flex-wrap: wrap;
}

.footer-link-group {
  flex: 1;
  padding: 0 15px;
  min-width: 200px;
}

.footer-link-group h4 {
  margin-bottom: 20px;
  color: var(--primary-color);
}

.footer-link-group ul {
  list-style: none;
}

.footer-link-group ul li {
  margin-bottom: 10px;
}

.footer-link-group ul li a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-link-group ul li a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  border-top: 1px solid #444;
  padding-top: 20px;
  text-align: center;
  font-size: 14px;
  color: #999;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .header {
    padding: 15px 20px;
    flex-direction: column;
  }

  .logo-container {
    margin-bottom: 15px;
  }

  .navigation {
    width: 100%;
  }

  .banner-title {
    font-size: 36px;
  }

  .banner-text {
    font-size: 18px;
  }

  .solution-card {
    flex-direction: column;
  }

  .solution-image {
    min-height: 200px;
  }

  .footer-top {
    flex-direction: column;
  }

  .footer-logo {
    margin-bottom: 30px;
    flex: 0 0 100%;
  }

  .footer-links {
    flex: 0 0 100%;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }

  .banner-title {
    font-size: 28px;
  }

  .banner-text {
    font-size: 16px;
  }

  .footer-link-group {
    flex: 0 0 50%;
    margin-bottom: 30px;
  }
}

@media (max-width: 576px) {
  .footer-link-group {
    flex: 0 0 100%;
  }
}
</style>
